<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	function checkpwd() {
		var old = $("input[name=oldpassword]").val();
		var newpwd = $("input[name=newpassword]").val();
		var newagainpwd = $("input[name=newagainpassword]").val();
		if (isNull(old)) {
			alert("旧密码不能为空");
			return false;
		}
		else if(isNull(newpwd)){
			alert("新密码不能为空");
			return false;
		}
		else if(isNull(newagainpwd)){
			alert("确认新密码不能为空");
			return false;
		}else if (newpwd != newagainpwd) {
			alert("两次输入的密码不一致");
			return false;
		}
		return true;
	}
	$(function() {
		$("#formID").validationEngine({
			showOnMouseOver : true
		});
	});
</script>
</head>
<body>
	<form name="pwdform" action="userInfoController.do?method=changePwd" method="post"
		id="formID">
		<div>
			<table class="FormView" border="0" cellspacing="1" cellpadding="0">
				<col class="Label" />
				<col class="Data" />
				<tr>
					<td>旧密码：
					</td>
					<td><input type="password" name="oldpassword"
						class="validate[required,custom[onlyLetterSp],lenth[0,32]] text"
						id="oldpassword" /><font color="red">**</font>
					</td>
				</tr>
				<tr>
					<td>新密码：
					</td>
					<td><input type="password" name="newpassword"
						class="text required,custom[noSpecialCaracters],length[0,32]"
						id="newpassword" /><font color="red">**</font>
					</td>
				</tr>
				<tr>
					<td>确认新密码:
					</td>
					<td><input type="password" name="newagainpassword"
						class="text required,custom[noSpecialCaracters],length[0,32]"
						id="newagainpassword" /><font color="red">**</font>
					</td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0" width="100%" height="30" style="position:absolute;bottom: 6px;border-top:1px solid gray">
				<tr>
					<td align="center"><input type="button" value="保存" onclick="save_click()">
						<input type="button" value="取消" onclick="back_click()"></td>
				</tr>
			</table>
		</div>
	</form>
</body>
</html>
